package com.summer.dao.bill;

import com.summer.pojo.Bill;

import java.sql.Connection;
import java.util.List;

/**
 * 作者:夏天
 * qq:1205232048
 */
public interface BillDao {
    /**
     * 根据连接 订单 返回添加结果
     * @param connection
     * @param bill
     * @return int
     * @throws Exception
     */
    public int add(Connection connection, Bill bill) throws Exception;

    /**
     * 根据连接 订单 返回订单集合
     * @param connection
     * @param bill
     * @return
     * @throws Exception
     */
    public List<Bill> getBillList(Connection connection, Bill bill) throws Exception;

    /**
     * 根据连接 订单Id 返回删除结果
     * @param connection
     * @param delId
     * @return
     * @throws Exception
     */
    public int deleteBillById(Connection connection, String delId) throws Exception;

    /**
     * 根据连接 订单Id 得到订单
     * @param connection
     * @param id
     * @return
     * @throws Exception
     */
    public Bill getBillById(Connection connection, String id) throws Exception;

    /**
     * 根据连接 订单 返回修改结果
     * @param connection
     * @param bill
     * @return
     * @throws Exception
     */
    public int modify(Connection connection, Bill bill) throws Exception;

    /**
     * 根据连接 供应商Id 返回该供应商有多少订单数
     * @param connection
     * @param providerId
     * @return
     * @throws Exception
     */
    public int getBillCountByProviderId(Connection connection, String providerId) throws Exception;
}
